const { parseDBCContent } = require('./dbc-parser.js');

console.log('Testing VAL_TABLE...');

const testContent = 'VERSION ""\nNS_ :\n  VAL_TABLE_\nBS_:\nBU_:\nVAL_TABLE_ test 1 "one" 0 "zero" ;\nBO_ 100 TestFrame: 8 Vector__XXX\n SG_ Signal1 : 0|8@1+ (1,0) [0|255] "" Vector__XXX\n';

try {
    const database = parseDBCContent(testContent, 'test.dbc');
    console.log('Success: ' + database.frames.length + ' frames');
    console.log('Warnings: ' + database.warnings.length);
} catch (error) {
    console.log('Error:', error.message);
} 